  import {mapGetters} from 'vuex'
  export default {
    computed: {
       ...mapGetters('m_cart', ['total']),
     },
    onShow(){
      this.onbarIndex()
    },
    watch:{
      total(){
        this.onbarIndex()
      }
    },
    methods:{
      onbarIndex(){
        uni.setTabBarBadge({
            index: 2, // 索引
            text: this.total + ""
        })
          // console.log(this.total)
      }
    }
  }